package cn.edu.scau.cmi.ZengLinghong.chapter10;

import java.io.*;

public class Example10_6 {
	public static void main(String[] args) {
		String content = "broadswort ޵";
		try {
			File f = new File("helle.txt");
			char[] a = content.toCharArray();
			FileWriter f2 = new FileWriter(f);
			f2.write(a);
			f2.close();

			FileReader f22 = new FileReader(f);
			StringBuffer s = new StringBuffer();
			char tom[] = new char[10];
			int n = -1;
			while ((n = f22.read(tom, 0, 10)) != -1) {
				String temp = new String(tom, 0, n);
				s.append(temp);
			}
			f22.close();
		} catch (IOException e) {
			System.out.println(e.toString());
		}
	}
}
